﻿using System.Reflection;
using IInject.Registration;

namespace IInject.Resolution
{
	public class PropertyDependency : Dependency<PropertyInfo, PropertyDependency>
	{
		public PropertyDependency(PropertyInfo property) : base(DependencyType.Property)
		{
			Dependent = property;
		}

		public PropertyDependency(InjectPropertyContext propertyContext) : this(propertyContext.Property)
		{
			Value = propertyContext.Value;
		}

		public TypeDependency Parent { get; set; }

		public object Value { get; private set; }
	}
}
